package com.wish.controller;


import com.wish.entity.TJrProduct;
import com.wish.service.ITJrProductService;
import com.wish.vo.ResultEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 五组
 * @since 2021-04-09
 */
@RestController
@RequestMapping("/wish/t-jr-product")
public class TJrProductController {

    @Autowired
    private ITJrProductService itJrProductService;

    @RequestMapping("/selectJrPro")
    public ResultEntity selectJrPro(){
        List<TJrProduct> list = itJrProductService.selectJrPro();
        return ResultEntity.ok(list);
    }

    @RequestMapping("/getOneJrPro")
    public ResultEntity getOneJrPro(Integer id){
        TJrProduct product = itJrProductService.getById(id);
        return ResultEntity.ok(product);
    }
}
